<HTML><HEAD><TITLE>vs_element(+VS, +I, -X)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(tentative)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>vs_element(+VS, +I, -X)</H1>
Get an element of a varset by index
<DL>
<DT><EM>VS</EM></DT>
<DD>A varset
</DD>
<DT><EM>I</EM></DT>
<DD>A positive integer
</DD>
<DT><EM>X</EM></DT>
<DD>A variable (output)
</DD>
</DL>
<H2>Description</H2>

	Get the Ith element of a varset. I must be between 1 and the
	size of the set.
    
<H3>Modes and Determinism</H3><UL>
<LI>vs_element(+, +, -) is det
</UL>
<H2>Examples</H2>
<PRE>
    ?- Vars=[A,B,C], vs_create(Vars, VS), vs_element(VS, 1, X).
    VS = ...
    X = C
    Yes (0.00s cpu)
    </PRE>
<H2>See Also</H2>
<A HREF="../../lib/tentative/vs_create-2.html">vs_create / 2</A>, <A HREF="../../lib/tentative/vs_size-2.html">vs_size / 2</A>
</BODY></HTML>
